package com.tepth.busfix.bean.reponse;

import java.io.Serializable;

/**
 * Created by pc on 2017/3/16.
 * 故障处理操作
 */

public class TroubleContent implements Serializable {
    long Id;
    //顶级类型 发动机系...
    long classificationId;
    String classificationName;
    long troubleTypeId;
    long troubleId;
    String troubleTypeName;
    Operation Operation;
    Part Component;
    Part Accessory;
    long UseCount;
    Person WorkPerson;
    String WorkTime;
    boolean isChecked;
    boolean IsRework;

    public long getTroubleId() {
        return troubleId;
    }

    public void setTroubleId(long troubleId) {
        this.troubleId = troubleId;
    }

    public String getClassificationName() {
        return classificationName;
    }

    public void setClassificationName(String classificationName) {
        this.classificationName = classificationName;
    }

    public boolean isRework() {
        return IsRework;
    }

    public void setRework(boolean rework) {
        IsRework = rework;
    }

    public long getTroubleTypeId() {
        return troubleTypeId;
    }

    public void setTroubleTypeId(long troubleTypeId) {
        this.troubleTypeId = troubleTypeId;
    }

    public String getTroubleTypeName() {
        return troubleTypeName;
    }

    public void setTroubleTypeName(String troubleTypeName) {
        this.troubleTypeName = troubleTypeName;
    }

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }

    public long getClassificationId() {
        return classificationId;
    }

    public void setClassificationId(long classificationId) {
        this.classificationId = classificationId;
    }

    public long getId() {
        return Id;
    }

    public void setId(long id) {
        Id = id;
    }

    public TroubleContent.Operation getOperation() {
        return Operation;
    }

    public void setOperation(TroubleContent.Operation operation) {
        Operation = operation;
    }

    public Part getComponent() {
        return Component;
    }

    public void setComponent(Part component) {
        Component = component;
    }

    public Part getAccessory() {
        return Accessory;
    }

    public void setAccessory(Part accessory) {
        Accessory = accessory;
    }

    public long getUseCount() {
        return UseCount;
    }

    public void setUseCount(long useCount) {
        UseCount = useCount;
    }

    public Person getWorkPerson() {
        return WorkPerson;
    }

    public void setWorkPerson(Person workPerson) {
        WorkPerson = workPerson;
    }

    public String getWorkTime() {
        return WorkTime;
    }

    public void setWorkTime(String workTime) {
        WorkTime = workTime;
    }

    public TroubleContent ProcessDecorate2TroubleContent(ProcessDecorate processDecorate) {
        classificationId = processDecorate.getTroubleClassificationId();
        troubleId = processDecorate.getTroubleId();
        classificationName = processDecorate.getTroubleClassificationName();
        troubleTypeId = processDecorate.getParentId();
        troubleTypeName = processDecorate.getTroubleName();
        Process process = processDecorate.getProcess();
      //  Id = processDecorate.getParentId();
        Operation = process.getOperation();
        Component = process.getComponent();
        Accessory = process.getAccessory();
        UseCount = process.getUseCount();
        return this;
    }

    public static class Operation implements Serializable {
        long Id;
        String Code;
        String Name;

        public long getId() {
            return Id;
        }

        public void setId(long id) {
            Id = id;
        }

        public String getCode() {
            return Code;
        }

        public void setCode(String code) {
            Code = code;
        }

        public String getName() {
            return Name;
        }

        public void setName(String name) {
            Name = name;
        }

        @Override
        public String toString() {
            return Name;
        }
    }

    public static class Part implements Serializable {
        long Id;
        String Code;
        String Name;
        String Unit;

        public long getId() {
            return Id;
        }

        public void setId(long id) {
            Id = id;
        }

        public String getCode() {
            return Code;
        }

        public void setCode(String code) {
            Code = code;
        }

        public String getName() {
            return Name;
        }

        public void setName(String name) {
            Name = name;
        }

        public String getUnit() {
            return Unit;
        }

        public void setUnit(String unit) {
            Unit = unit;
        }

        @Override
        public String toString() {
            return Name;
        }
    }
}
